﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HomeAutomation.actions;

namespace HomeAutomation
{
    class Flow
    {
        private List<State> states = new List<State>();

        public void AddState(State state)
        {
            states.Add(state);
        }

        public static List<Flow> getFlows()
        {
            List<Flow> flows = new List<Flow>();

            Flow backyard = new Flow();
            {
                State off = new StateImpl(backyard);
                State chime = new StateImpl(backyard,
                    new DeviceAction(Device.downstairsChime, Command.on));
                    //add other actions like sleep, light, voice

                DeviceFlowEvent backSensorOn = new DeviceFlowEvent(
                    new DeviceAction(Device.BACK_SENSOR, Command.on));
                

                off.addTransition(backSensorOn, chime);
            }


            return flows;
        }
    }
}
